package com.example.demo05.pojo;

import java.util.List;

public class Publisher {
    Integer pub_id;
    String pub_name;
    List<Book> bookList;

    @Override
    public String toString() {
        if (bookList!=null) {
            return "pid=" + pub_id +
                    ", name='" + pub_name + '\'' +
                    ", bookList=" + bookList +
                    '}';
        }else{
            return "pid=" + pub_id +
                    ", name='" + pub_name + '\'' +
                    '}';
        }
    }

    public Integer getPid() {
        return pub_id;
    }

    public void setPid(Integer pid) {
        this.pub_id = pid;
    }

    public String getName() {
        return pub_name;
    }

    public void setName(String name) {
        this.pub_name = name;
    }

    public List<Book> getBookList() {
        return bookList;
    }

    public void setBookList(List<Book> bookList) {
        this.bookList = bookList;
    }
}
